package com.jiang.jetpackdemo.database

import androidx.room.*
import com.jiang.jetpackdemo.model.ImgInfo


/**
 *
 * @ProjectName:    JetpackDemo
 * @ClassName:      ImgInfoDao
 * @Description:     java类作用描述
 * @Author:         江
 * @CreateDate:     2020/6/7 22:23
 */
@Dao
interface ImgInfoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(vararg imgInfo: ImgInfo)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertAll(list: MutableList<ImgInfo>)

    @Delete
    suspend fun delete(vararg imgInfo: ImgInfo)

    @Query("select * from Img")
    suspend fun queryAll(): MutableList<ImgInfo>
}